#pragma once
#include<iostream>
#include<assert.h>

using namespace std;

class Data
{
	friend ostream& operator<<(ostream& out, Data& d);
	friend istream& operator>>(istream& in, Data& d);

public:
	Data(int year = 1, int month = 1, int day = 1);
	int GetMonthDay(int year, int month);
	void Print();

	void operator=(Data& d);
	bool operator<(Data& d);
	bool operator==(Data& d);
	bool operator>(Data& d);
	bool operator<=(Data& d);
	bool operator>=(Data& d);
	bool operator!=(Data& d);

	Data& operator+=(int day);
	Data operator+(int day);
	Data& operator-=(int day);
	Data operator-(int day);

	Data& operator++();
	Data operator++(int);

	Data& operator--();
	Data operator--(int);

	int operator-(Data& d);

private:
	int _year;
	int _month;
	int _day;
};

ostream& operator<<(ostream& out, Data& d);
istream& operator>>(istream& in, Data& d);